import type { StudentForm } from "@/types/student";
import { ref } from "vue";

const originMap = {
  name: "",
  direction: "",
  teacher_id: "",
  manager_id: "",
  class: "",
};

export const useSearchStuMsg = () => {
  // 搜索表单
  const searchMapRef = ref({ ...originMap });

  // 重置搜索表单
  const reset = () => {
    searchMapRef.value = { ...originMap };
  };

  const checkSearch = ()=>{
  const values = Object.values(searchMapRef.value)
  return values.every((item)=>item ==="")
  }

  return {
    searchMapRef,
    reset,
    checkSearch
  };
};
